/* eslint-disable */
<template>
    <div>
      <div class="routeChild1" style="color: white;">
        <text  class="text"></text>
      </div>
      <div class="error"  @click="syntaxError">
        <text  class="text">syntaxError</text>
      </div>
      <div class="error"  @click="typeError">
        <text  class="text">typeError</text>
      </div>
      <div class="error" @click="referenceError">
        <text class="text">referenceError</text>
      </div>
      <div class="error"  @click="rangeError">
        <text  class="text">rangeError</text>
      </div>
      <div class="error"  @click="uriError">
        <text  class="text">uriError</text>
      </div>
      <div class="error" @click="evalError">
        <text class="text">evalError</text>
      </div>
      <div class="error" @click="interError">
        <text class="text">interError</text>
      </div>
    </div>
  </template>
<script>
const modal = weex.requireModule('modal')
const LOADMORE_COUNT = 4
export default {
  data () {
    return {
      lists: [1, 2, 3, 4, 5]
    }
  },
  methods: {
    syntaxError () {
      // eslint-disable-next-line no-eval
      eval('hoo bar')
    },
    typeError () {
      null.f()
    },
    referenceError () {
      // eslint-disable-next-line no-undef
      let a = undefinedVariable
      console.log(a)
    },
    rangeError () {
      throw new RangeError('The argument must be between -500 and 500.')
    },
    uriError () {
      decodeURIComponent('%')
    },
    evalError () {
      throw new EvalError('Hello', 'someFile.js', 10)
    },
    interError () {
      function loop (x) {
        if (x >= 1000000000000) return

        // 做一些事情
        loop(x + 1)
      }
      loop(0)
    },
    fetch (event) {
      modal.toast({ message: 'loadmore', duration: 1 })
      setTimeout(() => {
        const length = this.lists.length
        for (let i = length; i < length + LOADMORE_COUNT; ++i) {
          this.lists.push(i + 1)
        }
      }, 800)
    }
  }
}
</script>
  <style scoped>
    .panel {
      width: 600px;
      height: 250px;
      margin-left: 75px;
      margin-top: 35px;
      margin-bottom: 35px;
      flex-direction: column;
      justify-content: center;
      border-width: 2px;
      border-style: solid;
      border-color: rgb(162, 217, 192);
      background-color: rgba(162, 217, 192, 0.2);
    }
    .text {
      margin-top: 20px;
      font-size: 50px;
      text-align: center;
      color: #41B883;
    }
  </style>
